package com.five.second_shop.util;

import java.util.regex.Pattern;

/**
 * 判断邮箱是否符合规范
 */
public class JustMail {

    public static boolean justMail(String email){
        if (email.length()<6){
            return false;
        }
        Pattern pattern = Pattern.compile("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$");
        if (!pattern.matcher(email).matches()){
            return false;
        }
        return true;
    }
}
